import java.util.ArrayList;
import java.util.HashMap;

public class CCPVPopulation implements PopulationInterface<String, String>{

	public static void main(String[] args) {
		ArrayList<String> religions = new ArrayList<String>();
		religions.add("Buddhist");religions.add("Catholic");
		religions.add("Protestant");religions.add("Hinduist");
		ArrayList<String> languages = new ArrayList<String>();
		languages.add("Thai");languages.add("Mandarin");
		languages.add("Spanish");languages.add("French");
		ArrayList<String> ethnicities = new ArrayList<String>();
		ethnicities.add("caucasion");ethnicities.add("hawaiian");
		ethnicities.add("alaskan");ethnicities.add("hispanic");		
		StringStringCategory religion = new StringStringCategory("religion", religions);
		StringStringCategory language = new StringStringCategory("languages", languages);
		StringStringCategory ethnicity = new StringStringCategory("ethnicities", ethnicities);
		ArrayList<CategoryInterface<String, String>> categories = new ArrayList<CategoryInterface<String, String>>();
		categories.add(religion);categories.add(language);categories.add(ethnicity);
		CCPVPopulation population = new CCPVPopulation(categories);
		
		
	}
	
	public CCPVPopulation(ArrayList<CategoryInterface<String, String>> populationCategories){
		this.populationCategories = populationCategories;
	}
	
	class SubPopulationInfo{
		public int size;
		public float power;
	}
	
	ArrayList<CategoryInterface<String, String>> populationCategories;
	HashMap<ArrayList<CategoryAttributePair<String, String>>, SubPopulationInfo> subPopulationsInfo;
	
	
	@Override
	public ArrayList<CategoryInterface<String, String>> getCategories() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setSubPopulationPower(
			ArrayList<CategoryAttributePair<String, String>> pairs, float power) {
		subPopulationsInfo.get(pairs).power = power;
	}

	@Override
	public void setSubPopulationSize(
			ArrayList<CategoryAttributePair<String, String>> pairs, int size) {
		subPopulationsInfo.get(pairs).size = size;
	}
	
	
}

interface PopulationInterface<CategoryType, AttributeType>{
	
	public ArrayList<CategoryInterface<CategoryType, AttributeType>> getCategories();
	public void setSubPopulationSize(ArrayList<CategoryAttributePair<CategoryType, AttributeType>> pairs, int size);
	public void setSubPopulationPower(ArrayList<CategoryAttributePair<CategoryType, AttributeType>> pairs, float power);
}

class StringStringCategory implements CategoryInterface<String, String>{

	String categoryName;
	ArrayList<String> attributeNames;
	
	public StringStringCategory(String categoryName,
			ArrayList<String> attributeNames) {
		super();
		this.categoryName = categoryName;
		this.attributeNames = attributeNames;
	}

	@Override
	public ArrayList<String> getAttributes() {
		return attributeNames;
	}

	@Override
	public String getCategory() {
		return categoryName;
	}
	
}

class StringStringPair implements CategoryAttributePair<String, String>{

	@Override
	public String getAttribute() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getCategory() {
		// TODO Auto-generated method stub
		return null;
	}
	
}

interface CategoryInterface<CategoryType, AttributeType>{
	public CategoryType getCategory();
	public ArrayList<AttributeType> getAttributes();
	//public ArrayList<CategoryAttributePair<CategoryType, AttributeType>> getAttributes();
}

interface CategoryAttributePair<CategoryType, AttributeType>{
	public CategoryType getCategory();
	public AttributeType getAttribute();
}
